cmake_minimum_required(VERSION 3.22)
#cmake -S . -B build -G "Ninja" && cmake --build build --target CapnTest && ctest --build-run-dir build --test-dir build
project(CapnTest VERSION 0.1.1 DESCRIPTION "Capn Proto Test" LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ${CMAKE_FIND_LIBRARY_SUFFIXES})

find_package(GTest CONFIG REQUIRED)
find_package(glog CONFIG REQUIRED)

include(GoogleTest)

add_executable(${PROJECT_NAME}
        CapnTest.cpp
)
enable_testing()

target_link_libraries(
        ${PROJECT_NAME}
        GTest::gtest_main
        glog::glog
)

#add_test(NAME CapnTest COMMAND ${PROJECT_NAME})
# add tests into CTest
gtest_discover_tests(${PROJECT_NAME})